﻿namespace TestTool.Proxies.Event
{
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    using System.ServiceModel;
    using System.ServiceModel.Channels;
    using System.Xml;

    [DebuggerStepThrough, GeneratedCode("System.ServiceModel", "3.0.0.0")]
    public class EventPortTypeClient : ClientBase<EventPortType>, EventPortType
    {
        public EventPortTypeClient()
        {
        }

        public EventPortTypeClient(string endpointConfigurationName) : base(endpointConfigurationName)
        {
        }

        public EventPortTypeClient(Binding binding, EndpointAddress remoteAddress) : base(binding, remoteAddress)
        {
        }

        public EventPortTypeClient(string endpointConfigurationName, EndpointAddress remoteAddress) : base(endpointConfigurationName, remoteAddress)
        {
        }

        public EventPortTypeClient(string endpointConfigurationName, string remoteAddress) : base(endpointConfigurationName, remoteAddress)
        {
        }

        public EndpointReferenceType CreatePullPointSubscription(FilterType Filter, string InitialTerminationTime, CreatePullPointSubscriptionSubscriptionPolicy SubscriptionPolicy, ref XmlElement[] Any, out DateTime CurrentTime, out DateTime? TerminationTime)
        {
            CreatePullPointSubscriptionRequest request = new CreatePullPointSubscriptionRequest {
                Filter = Filter,
                InitialTerminationTime = InitialTerminationTime,
                SubscriptionPolicy = SubscriptionPolicy,
                Any = Any
            };
            CreatePullPointSubscriptionResponse response = ((EventPortType) this).CreatePullPointSubscription(request);
            CurrentTime = response.CurrentTime;
            TerminationTime = response.TerminationTime;
            Any = response.Any;
            return response.SubscriptionReference;
        }

        public string[] GetEventProperties(out bool FixedTopicSet, out TopicSetType TopicSet, out string[] TopicExpressionDialect, out string[] MessageContentFilterDialect, out string[] ProducerPropertiesFilterDialect, out string[] MessageContentSchemaLocation, out XmlElement[] Any)
        {
            GetEventPropertiesRequest request = new GetEventPropertiesRequest();
            GetEventPropertiesResponse eventProperties = ((EventPortType) this).GetEventProperties(request);
            FixedTopicSet = eventProperties.FixedTopicSet;
            TopicSet = eventProperties.TopicSet;
            TopicExpressionDialect = eventProperties.TopicExpressionDialect;
            MessageContentFilterDialect = eventProperties.MessageContentFilterDialect;
            ProducerPropertiesFilterDialect = eventProperties.ProducerPropertiesFilterDialect;
            MessageContentSchemaLocation = eventProperties.MessageContentSchemaLocation;
            Any = eventProperties.Any;
            return eventProperties.TopicNamespaceLocation;
        }

        public Capabilities GetServiceCapabilities()
        {
            return base.Channel.GetServiceCapabilities();
        }

        [EditorBrowsable(EditorBrowsableState.Advanced)]
        CreatePullPointSubscriptionResponse EventPortType.CreatePullPointSubscription(CreatePullPointSubscriptionRequest request)
        {
            return base.Channel.CreatePullPointSubscription(request);
        }

        [EditorBrowsable(EditorBrowsableState.Advanced)]
        GetEventPropertiesResponse EventPortType.GetEventProperties(GetEventPropertiesRequest request)
        {
            return base.Channel.GetEventProperties(request);
        }
    }
}

